package clinicapoo.dao;

import clinicapoo.model.Consulta;
import java.util.List;

/**
 *
 * @author Fabio Montezuma
 */
public class ConsultaDAO extends BaseDAO
{
    public List<Consulta> buscarConsultas()
    {
        log.debug("Buscando consultas");
        return getEntityManager().createQuery("from Consulta").getResultList();
    }

    public void cadastrar(Consulta c)
    {
        log.debug(c.toString());
        getEntityManager().persist(c);
    }

    public void atualizar(Consulta c)
    {
        log.debug(c.toString());
        getEntityManager().merge(c);
    }
}
